﻿@model List<Pku.BookStore.Model.OrderFormModel>
@using Pku.BookStore.Web.Controllers;
@{
    Layout = "~/Views/Shared/_UserLayout.cshtml";
    ViewBag.Title = "OrderList";
}

<link href="/Content/user.self.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jsAddress.js" type="text/javascript"></script>
<div class="right">
    <div class="o-mt">
        <h2>
            订单列表</h2>
    </div>
    <div class="m m5" id="buy-area" data-widget="tabs">
        <div class="mt">
            <ul class="tab">
                <li clstag="click|keycount|myhome|onemorder" id="latelyOrderListLi" data="1" class="curr"
                    data-widget="tab-item"><s></s><b></b>最新订单</li>
            </ul>
        </div>
        <div class="mc">
            <div class="tabcon" id="order-list" data-widget="tab-content">
                <div class="mc">
                    <div id="order-list" class="tabcon">
                        <div id="latelyOrderListDiv" class="tb-void tb-rows">
                            <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                <tbody>
                                    <tr>
                                        <th width="90">
                                            订单编号
                                        </th>
                                        <th>
                                            订单商品
                                        </th>
                                        <th width="90">
                                            收货人
                                        </th>
                                        <th width="90">
                                            订单金额
                                        </th>
                                        <th width="90">
                                            下单时间
                                        </th>
                                        <th width="90">
                                            订单状态
                                        </th>
                                        <th width="120">
                                            操作
                                        </th>
                                    </tr>
                                    @{
                                        foreach (var item in Model)
                                        {
                                        <tr>
                                            <td>
                                                @item.OrderID
                                            </td>
                                            <td>
                                                <div class="img-list">
                                                    @foreach (var pitem in item.OrderList)
                                                    {
                                                        <a href="/Product/Detail/@pitem.BookID" target="_blank">
                                                            <img src="@pitem.Image" title="@pitem.BookName" width="60" /></a>
                                                    }
                                                </div>
                                            </td>
                                            <td>
                                                @item.Recipients
                                            </td>
                                            <td>
                                                <div class="ftx-01">
                                                    ￥@item.TotalPrice</div>
                                                货到付款
                                            </td>
                                            <td>
                                                <div class="ftx-03">
                                                    @item.OrderData</div>
                                            </td>
                                            <td>
                                                <span class="ftx-03">@Pku.BookStore.Utility.EnumHelper.GetEnumDescription((Pku.BookStore.Utility.EnumUtility.OrderStatus)@item.OrderStatus)</span>
                                            </td>
                                            <td>
                                                <a href="/User/OrderEdit/@item.OrderID">查看详情</a><span class="ftx-05"></span>
                                            </td>
                                        </tr>
                                        }
                                    }
                                </tbody>
                            </table>
                        </div>
                        <div class="pager">@Html.Raw(UserControls.Pager(Html, "p", 10, ViewBag.OrderCount))</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--buy-area-->
</div>


